/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2022-11-04
 * Time: 20:10
 */
public class Test1 {
    public static void main(String[] args) {
      String s = "abcabcabcertertabc";
      String a= "x";
      int l = s.length();
      int l1 = a.length();
      String se = s.replace(a,"");
      int le = se.length();
      if(le == 0){
          System.out.println(l/l1);
      }else {
          System.out.println((l-le)/l1);
      }
    }
}
